package nodes.binary;

import nodes.AbstractNode;
import nodes.ConstantNode;
import model.Model;

/**
 * Used for representing addition in the expression tree
 */
public class AddNode extends AbstractBinaryNode
{

    public AddNode (Model model)
    {
        super(model);
        myName = syntaxBundle.getString("addition_label");
    }


    public AbstractNode evaluate ()
    {
        return new ConstantNode(myLeft.evaluate().getValue() + myRight.evaluate().getValue());
    }

}
